<?php
/**
 * Created by PhpStorm.
 * User: wliu
 * Date: 14-3-19
 * Time: 上午9:36
 */

class GoodsTotalInfo extends EMongoDocument {
    public $priseNum;
    public $browserNum;
    public $salesNum;
    public $shareNum;
    public $favoritesNum;
    public $commentNum;
    public $goods;

    public function getCollectionName()
    {
        return 'goods_totalInfo';
    }

    // We can define rules for fields, just like in normal CModel/CActiveRecord classes
    public function rules()
    {
        return array(

        );
    }

    // the same with attribute names
    public function attributeNames() {
        return array(
            'priseNum' => 'priseNum',
            'browserNum' => 'browserNum',
            'salesNum'=>'salesNum',
            'shareNum'=>'shareNum',
            'favoritesNum'=>'favoritesNum',
            'commentNum'=>'commentNum',
            'goods'=>'goods',
            '_id'=>'_id',
        );
    }

    /**
     * This method have to be defined in every model, like with normal CActiveRecord
     */
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }
} 